<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>发票借据管理 - 发票借据管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <!-- jqgrid-->
    <link href="css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <style>
        #alertmod_table_list_2 {
            top: 900px !important;
        }
    </style>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox ">
                    <div class="row">
                        <p style="padding-left: 18px;">
                            <button type="button" class="btn btn-w-m btn-danger"  data-toggle="modal" data-target="#myModal5">新增合同</button>
                            <button type="button" class="btn btn-w-m btn-primary">删除合同</button>
                            <button type="button" class="btn btn-w-m btn-success">导入</button>
                            <button type="button" class="btn btn-w-m btn-info">导出</button>
                        </p>
                    </div>
                    <div class="ibox-content">  
                        <div class="jqGrid_wrapper">
                            <table id="table_list_2"></table>
                            <div id="pager_list_2"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <!-- Peity -->
    <script src="js/plugins/peity/jquery.peity.min.js"></script>
    <!-- jqGrid -->
    <script src="js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
    <script src="js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
    <script src="js/content.js?v=1.0.0"></script>
    <!-- Page-Level Scripts -->
    <script>
        $(document).ready(function () {
            $.jgrid.defaults.styleUI = 'Bootstrap';
            // Examle data for jqGrid
            var mydata = [
                {
                    id: "1",
                    invdate: "2010-05-24",
                    name: "test",
                    note: "note",
                    tax: "10.00",
                    total: "2111.00"
                },
                {
                    id: "2",
                    invdate: "2010-05-25",
                    name: "test2",
                    note: "note2",
                    tax: "20.00",
                    total: "320.00"
                },
                {
                    id: "3",
                    invdate: "2007-09-01",
                    name: "test3",
                    note: "note3",
                    tax: "30.00",
                    total: "430.00"
                },
                {
                    id: "4",
                    invdate: "2007-10-04",
                    name: "test",
                    note: "note",
                    tax: "10.00",
                    total: "210.00"
                },
                {
                    id: "5",
                    invdate: "2007-10-05",
                    name: "test2",
                    note: "note2",
                    tax: "20.00",
                    total: "320.00"
                },
                {
                    id: "6",
                    invdate: "2007-09-06",
                    name: "test3",
                    note: "note3",
                    tax: "30.00",
                    total: "430.00"
                },
                {
                    id: "7",
                    invdate: "2007-10-04",
                    name: "test",
                    note: "note",
                    tax: "10.00",
                    total: "210.00"
                },
                {
                    id: "8",
                    invdate: "2007-10-03",
                    name: "test2",
                    note: "note2",
                    amount: "300.00",
                    tax: "21.00",
                    total: "320.00"
                },
                {
                    id: "9",
                    invdate: "2007-09-01",
                    name: "test3",
                    note: "note3",
                    amount: "400.00",
                    tax: "30.00",
                    total: "430.00"
                },
                {
                    id: "11",
                    invdate: "2007-10-01",
                    name: "test",
                    note: "note",
                    amount: "200.00",
                    tax: "10.00",
                    total: "210.00"
                },
                {
                    id: "12",
                    invdate: "2007-10-02",
                    name: "test2",
                    note: "note2",
                    amount: "300.00",
                    tax: "20.00",
                    total: "320.00"
                },
                {
                    id: "13",
                    invdate: "2007-09-01",
                    name: "test3",
                    note: "note3",
                    amount: "400.00",
                    tax: "30.00",
                    total: "430.00"
                },
                {
                    id: "14",
                    invdate: "2007-10-04",
                    name: "test",
                    note: "note",
                    amount: "200.00",
                    tax: "10.00",
                    total: "210.00"
                },
                {
                    id: "15",
                    invdate: "2007-10-05",
                    name: "test2",
                    note: "note2",
                    amount: "300.00",
                    tax: "20.00",
                    total: "320.00"
                },
                {
                    id: "16",
                    invdate: "2007-09-06",
                    name: "test3",
                    note: "note3",
                    amount: "400.00",
                    tax: "30.00",
                    total: "430.00"
                },
                {
                    id: "17",
                    invdate: "2007-10-04",
                    name: "test",
                    note: "note",
                    amount: "200.00",
                    tax: "10.00",
                    total: "210.00"
                },
                {
                    id: "18",
                    invdate: "2007-10-03",
                    name: "test2",
                    note: "note2",
                    amount: "300.00",
                    tax: "20.00",
                    total: "320.00"
                },
                {
                    id: "19",
                    invdate: "2007-09-01",
                    name: "test3",
                    note: "note3",
                    amount: "400.00",
                    tax: "30.00",
                    total: "430.00"
                },
                {
                    id: "21",
                    invdate: "2007-10-01",
                    name: "test",
                    note: "note",
                    amount: "200.00",
                    tax: "10.00",
                    total: "210.00"
                },
                {
                    id: "22",
                    invdate: "2007-10-02",
                    name: "test2",
                    note: "note2",
                    amount: "300.00",
                    tax: "20.00",
                    total: "320.00"
                },
                {
                    id: "23",
                    invdate: "2007-09-01",
                    name: "test3",
                    note: "note3",
                    amount: "400.00",
                    tax: "30.00",
                    total: "430.00"
                },
                {
                    id: "24",
                    invdate: "2007-10-04",
                    name: "test",
                    note: "note",
                    amount: "200.00",
                    tax: "10.00",
                    total: "210.00"
                },
                {
                    id: "25",
                    invdate: "2007-10-05",
                    name: "test2",
                    note: "note2",
                    amount: "300.00",
                    tax: "20.00",
                    total: "320.00"
                },
                {
                    id: "26",
                    invdate: "2007-09-06",
                    name: "test3",
                    note: "note3",
                    amount: "400.00",
                    tax: "30.00",
                    total: "430.00"
                },
                {
                    id: "27",
                    invdate: "2007-10-04",
                    name: "test",
                    note: "note",
                    amount: "200.00",
                    tax: "10.00",
                    total: "210.00"
                },
                {
                    id: "28",
                    invdate: "2007-10-03",
                    name: "test2",
                    note: "note2",
                    amount: "300.00",
                    tax: "20.00",
                    total: "320.00"
                },
                {
                    id: "29",
                    invdate: "2007-09-01",
                    name: "test3",
                    note: "note3",
                    amount: "400.00",
                    tax: "30.00",
                    total: "430.00"
                }
            ];

            // Configuration for jqGrid Example 2
            $("#table_list_2").jqGrid({
                data: mydata,
                datatype: "local",
                height: 450,
                autowidth: true,
                shrinkToFit: true,
                rowNum: 20,
                rowList: [10, 20, 30],
                colNames: ['序号','发票借据编号', '创建日期', '部门', '借发票是由', '借发票张数', '状态', '操作','金额'],
                colModel: [
                    {
                        name: 'id',
                        index: 'id',
                        editable: true,
                        width: 60,
                        sorttype: "int",
                        search: true,
                        align: "left"
                    },
                    {
                        name: 'invdate',
                        index: 'invdate',
                        editable: true,
                        width: 90,
                        sorttype: "date",
                        align: "left",
                        formatter: "date"
                    },
                    {
                        name: 'name',
                        index: 'name',
                        editable: true,
                        align: "left",
                        width: 100
                    },
                    {
                        name: 'amount',
                        index: 'amount',
                        editable: true,
                        width: 80,
                        align: "left",
                        sorttype: "float",
                        formatter: "number"
                    },
                    {
                        name: 'tax',
                        index: 'tax',
                        editable: true,
                        width: 80,
                        align: "left",
                        sorttype: "float"
                    },
                    {
                        name: 'total',
                        index: 'total',
                        editable: true,
                        width: 80,
                        align: "left",
                        sorttype: "float"
                    },
                    {
                        name: 'note',
                        index: 'note',
                        editable: true,
                        width: 100,
                        align: "left",
                        sortable: false
                    },
                    {
                        name: 'note',
                        index: 'note',
                        editable: true,
                        width: 100,
                        align: "left",
                        sortable: false
                    },
                    {
                        name: 'note',
                        index: 'note',
                        editable: true,
                        width: 100,
                        align: "left",
                        sortable: false
                    }

                ],
                pager: "#pager_list_2",
                viewrecords: true,
                caption: "发票借据管理",
                add: true,
                edit: true,
                addtext: 'Add',
                edittext: 'Edit',
                hidegrid: false
            });
            // Add selection
            $("#table_list_2").setSelection(4, true);
            // Setup buttons
            $("#table_list_2").jqGrid('navGrid', '#pager_list_2', {
                edit: true,
                add: true,
                del: true,
                search: true
            }, {
                height: 200,
                reloadAfterSubmit: true
            });
            // Add responsive to jqGrid
            $(window).bind('resize', function () {
                var width = $('.jqGrid_wrapper').width();
                $('#table_list_1').setGridWidth(width);
                $('#table_list_2').setGridWidth(width);
            });
        });
    </script>
    <div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">新增发票借据</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal m-t" id="hetongForm">
                       <!--  <label>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">部门</label>
                                <div class="col-sm-10">
                                    <input id="kyAmount" name="kyNumber" type="text" class="form-control" required="" aria-required="true">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">电话</label>
                                <div class="col-sm-10">
                                    <input id="kyAmount" name="kyName" type="text" class="form-control" required="" aria-required="true">
                                </div>
                            </div>
                        </label>
                        <label>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">借发票原因</label>
                                <div class="col-sm-10">
                                    <input id="kyAmount" name="kyDutyId" type="text" class="form-control" required="" aria-required="true">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">借发票张数</label>
                                <div class="col-sm-10">
                                    <input id="kyAmount" name="kyStartDate" type="text" class="form-control" data-mask="9999-99-99" placeholder="" required="" aria-required="true">
                                </div>
                            </div>
                        </label>
                        <label>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">金额</label>
                                <div class="col-sm-10">
                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">合同号</label>
                                <div class="col-sm-10">
                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                    </div>
                                </div>
                            </div>
                        </label>
                        <label>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">合同金额</label>
                                <div class="col-sm-10">
                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">合同名称</label>
                                <div class="col-sm-10">
                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                    </div>
                                </div>
                            </div>
                        </label>
                        <label>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">对方单位</label>
                                <div class="col-sm-10">
                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">备注</label>
                                <div class="col-sm-10">
                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                    </div>
                                </div>
                            </div>
                        </label>
                        <%--<label></label>--%> -->
<div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins"> 
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <table class="table table-bordered table-striped">                           
                                    <tr>
                                        <td colspan="3">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">部门</label>
                                                <div class="col-sm-10">
                                                    <input id="kyAmount" name="kyNumber" type="text" class="form-control" required="" aria-required="true">
                                                </div>
                                            </div>
                                        </td>
                                        <td colspan="3">
                                             <div class="form-group">
                                                <label class="col-sm-2 control-label">电话</label>
                                                <div class="col-sm-10">
                                                    <input id="kyAmount" name="kyName" type="text" class="form-control" required="" aria-required="true">
                                                </div>
                                             </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        
                                        <td colspan="3">
                                             <div class="form-group">
                                                <label class="col-sm-2 control-label">借发票原因</label>
                                                <div class="col-sm-10">
                                                    <input id="kyAmount" name="kyDutyId" type="text" class="form-control" required="" aria-required="true">
                                                </div>
                                            </div>
                                        </td>
                                        <td colspan="3">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">借发票张数</label>
                                                <div class="col-sm-10">
                                                    <input id="kyAmount" name="kyStartDate" type="text" class="form-control" data-mask="9999-99-99" placeholder="" required="" aria-required="true">
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                      
                                        <td colspan="3">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">金额</label>
                                                <div class="col-sm-10">
                                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                        <td colspan="3">
                                             <div class="form-group">
                                                <label class="col-sm-2 control-label">合同号</label>
                                                <div class="col-sm-10">
                                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                       
                                    </tr>
                                    <tr>
                                       
                                        <td colspan="3">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">合同金额</label>
                                                 <div class="col-sm-10">
                                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                        <td colspan="3">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">合同名称</label>
                                                <div class="col-sm-10">
                                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                   
                                    <tr>
                                        
                                        <td colspan="3">
                                             <div class="form-group">
                                                <label class="col-sm-2 control-label">对方单位</label>
                                                <div class="col-sm-10">
                                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                   
                                        <td colspan="3">
                                             <div class="form-group">
                                                <label class="col-sm-2 control-label">备注</label>
                                                <div class="col-sm-10">
                                                    <div class="input-group m-b"><span class="input-group-addon">¥</span>
                                                        <input id="kyAmount" name="kyAmount" type="text" class="form-control" required="" aria-required="true">
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

                    </form>
                </div>

                <div class="modal-footer">
                    <button id=close_add_hetong type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                    <button class="btn btn-primary" type="button" onclick="save();">保存</button>
                </div>
            </div>
        </div>
    </div>
</body>

</html>
